﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

namespace BitPortal.Controls
{
    public class BaseUserControl : System.Web.UI.UserControl
    {
        public Models.Module ReferenceModule { set; get; }

        /// <summary>
        /// Register Client Script
        /// </summary>
        /// <param name="script"></param>
        /// <param name="key"></param>
        public virtual void RegisterScript(string script, string key = null)
        {
            if (key == null) key = "Key" + DateTime.Now.GetHashCode();
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), key, script, true);
        }

    }
}